figure {
    max-width: 300px;
    max-width: min-content;
    margin: auto;
}

figure>img {
    max-width: inherit;
}